import maya.cmds as mc

selectionConnection = mc.outlinerEditor("graphEditor1OutlineEd",
                                        query=True, selectionConnection=True)
selObj = mc.ls(selection=True, long=True)
selAttr = mc.channelBox("mainChannelBox", query=True,
                        selectedMainAttributes=True)

for so in selObj:
    mc.selectionConnection(selectionConnection, edit=True, deselect=so)
    for sa in selAttr:
        mc.selectionConnection(selectionConnection, edit=True, select=so+"."+sa)